import java.util.Date;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-06-08
 * Time: 17:53
 */
public class Test {
    public static int sumOddLengthSubarrays(int[] arr) {
        //前缀和
        int ans = 0;
        int i,j,pre;
        //1,4,2,5,3
        for(i = 1; i < arr.length; i++){
            arr[i] += arr[i-1];
        }
        for(i = 1; i <= arr.length; i+=2){
            for(j = i-1; j < arr.length; j++){
                if(j - i == -1){
                    pre = 0;
                }else{
                    pre = arr[j - i];
                }
                ans += arr[j] -pre;
            }
        }
        return ans;
    }

    public static void main(String[] args) {
        int[] nums = {1,4,2,5,3};
        System.out.println(sumOddLengthSubarrays(nums));
    }
    public static String myRever(String s,int x,int y){
        int l = x;
        int r = y-1;
        char[] arr = s.toCharArray();
        while(l < r){
            char ch = arr[l];
            arr[l] = arr[r];
            arr[r] = ch;
            l++;
            r--;
        }
        return new String(arr);
    }
    public static String func(String s,int x){
        //[0.x-1]  [x s.nums.length()-1]
        s = myRever(s,0,x);
        s = myRever(s,x,s.length());
        s = myRever(s,0,s.length());
        return s;
    }
    public static void main1(String[] args) {
        Scanner scaner = new Scanner(System.in);
        int x = scaner.nextInt();
        String s = scaner.next();
        System.out.println(func(s, x));
    }
}
